POF.auth.loginView = Backbone.View.extend({

    initialize: function() {
        var self = this;
        console.log("--loginView init");
        /** init */
        self._bindValidate();
    },

    _bindValidate: function() {
        var self = this;
        self.$("#loginForm").validate({
            rules : {
                'j_username' : {
                    required : true,
                    minlength : 3
                },
                'j_password' : {
                    required : true,
                    minlength : 3
                }
            },
            messages : {
                'j_username' : {
                    required : "请填写用户名!",
                    minlength : "用户名必须大于3个字母或数字!"
                },
                'j_password' : {
                    required: "请填写密码!",
                    minlength : "密码必须大于3个字母或数字!"
                }
            },
            errorPlacement: function(error, element) {
                error.appendTo($("#errorMsg"));
            }
        });
    }
});